package com.turing.post.account.util;

import java.math.BigInteger;
import java.util.Date;
import java.util.List;

import com.turing.post.util.PCPSApplicationException;
import com.turing.post.util.PCPSWebInput;

public interface OnlineTransferDetailDao {

	/**
	 * 根据流水号,获取联机转账明细
	 * 
	 * @param localSeqNo
	 * @return
	 */
	public OnlineTransferDetail getOnlineTransferDetailByLocalSeqNo(
			String localSeqNo);

	/**
	 * 新增
	 * 
	 * @param otd
	 * @throws PCPSApplicationException
	 */
	public void insert(OnlineTransferDetail otd)
			throws PCPSApplicationException;

	/**
	 * 更新
	 * 
	 * @param otd
	 * @throws PCPSApplicationException
	 */
	public void update(OnlineTransferDetail otd)
			throws PCPSApplicationException;

	/**
	 * 根据查询条件查询获取联机转账明细列表
	 * 
	 * @param webInput
	 * @param localSeqNo
	 * @param saleBranchNo
	 * @param startTime
	 * @param endTime
	 * @param tranType
	 * @param status
	 * @param checkStatus
	 * @return
	 */
	public List<OnlineTransferDetail> getOnlineTransferDetailList(
			PCPSWebInput webInput, String localSeqNo, String cardNo,
			String saleBranchNo, String startTime, String endTime,
			String tranType, String status, String checkStatus, Integer page);

	/**
	 * 根据查询条件查询获取联机转账明细总数
	 * 
	 * @param webInput
	 * @param localSeqNo
	 * @param saleBranchNo
	 * @param startTime
	 * @param endTime
	 * @param tranType
	 * @param status
	 * @param checkStatus
	 * @return
	 */
	public BigInteger getOnlineTransferDetailTotal(PCPSWebInput webInput,
			String localSeqNo, String cardNo, String saleBranchNo,
			String startTime, String endTime, String tranType, String status,
			String checkStatus);

	/**
	 * 修改联机流水状态
	 * 
	 * @param localSeqNo
	 * @param status
	 * @throws PCPSApplicationException
	 */
	public void updateOnlineTransferDetailStatus(String localSeqNo,
			String status, String rtnCode) throws PCPSApplicationException;

	/**
	 * 根据联机转账明细表产生发卡商日结列表
	 * 
	 * @param issueCompanyNo
	 *            发卡商编号
	 * @param tranDate
	 *            账务日期
	 * @return 联机转账明细列表
	 */
	public List<Object[]> generateOnlineTransferDetail(String issueCompanyNo,
			Date tranDate);

	/**
	 * 联机核对总帐
	 * 
	 * @param Trandate
	 * @param TranType
	 * @return
	 * @throws PCPSApplicationException
	 */
	public Object[] checkAccuntByTrandateAndTranType(String Trandate,
			String TranType) throws PCPSApplicationException;

	/**
	 * 联机核对明细
	 * @param Trandate
	 * @param TranType
	 * @param CardNo
	 * @return
	 * @throws PCPSApplicationException
	 */
	public double checkAccuntDetailByTrandateAndTranType(String Trandate,
			String TranType, String CardNo) throws PCPSApplicationException;
	
	/**
	 * 修改总帐核对正确的交易明细
	 * @param Trandate
	 * @param TranType
	 * @throws PCPSApplicationException
	 */
	public void updateCheckAccuntSuccessDetail(String Trandate,
			String TranType) throws PCPSApplicationException;
}
